package chat.servlet;

import java.io.IOException;
import java.io.PrintWriter;
import java.security.Provider.Service;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class Register extends HttpServlet{
		@Override
		protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
			String path = req.getContextPath();
			req.setCharacterEncoding("utf-8");
			resp.setCharacterEncoding("utf-8");
			PrintWriter w= resp.getWriter();
			w.println("<!DOCTYPE html>");
			w.println("<html>");
				w.println("<head>");
					w.println("<meta charset='utf-8' />");
					w.println("<title></title>");
					w.println("<style type='text/css'>");
					w.println("#LoginMain{");
					w.println("	width: 300px;");
					w.println("	height: 400px;");
					w.println("	background-color: lightblue ;");
					w.println("	text-align: center;");
					w.println("	margin: 0 auto;");
					w.println("	border-radius:30px;");
					w.println("	box-shadow:10px 10px 20px lightblue;");
					w.println("}");
					w.println("#Head{");
					w.println("width:100%;");
					w.println("height:15%;");
					w.println("background-color: whitesmoke;");
					w.println("border-radius:30px 30px 0px 0px;");
					w.println("}");
					w.println("#Head h1{");
					w.println("font-family: '微软雅黑';");
					w.println("color:lightblue;");
					w.println("text-align: center;");
					w.println("line-height:60px;");
					w.println("}");
					w.println(".bt{");
					w.println("width: 80px;");
					w.println("background-color: #00CED1;");
					w.println("color: white;");
					w.println("border: 1px;");
			w.println("	border-radius: 5px;");																								
			w.println("	}");
					w.println("</style>");
				w.println("</head>");
				w.println("<body>");
					w.println("<div id='LoginMain' >");
						w.println("<div id='Head' >");
							w.println("<h1 >欢迎注册</h1>");
						w.println("</div>");
						
						w.println("<div style='position:relative;top:100px;'>");
							w.println("<form>");
								w.println("<span style='font-family: '微软雅黑';color:whitesmoke ;'>账号：</span><input type='text' name='name'/><br /><br />");
								w.println("<span style='font-family: '微软雅黑';color:whitesmoke ;'>密码：</span><input type='password' name='pwd' /><br /><br />");
								w.println("<span style='font-family: '微软雅黑';color:whitesmoke ;'>确认：</span><input type='password' name='rPwd' /><br /><br /><br /><br />");
								
								w.println("<a href='"+path+"/Login'><input class='bt' type='button' value='注册' /></a>&emsp;&emsp;");
								w.println("<a href='"+path+"/Login'><input class='bt'  type='button' value='返回'/></a>");
							w.println("</form>");
						w.println("</div>");
					w.println("</div>");
					w.println("</body>");
					w.println("</html>");
		}

}
